/*Copyright (C) 2013-2021 LZE*/
#include<bits/stdc++.h>
#define fo(x) freopen(#x".in","r",stdin);freopen(#x".out","w",stdout);
#define INF 0x7fffffff
#define mod 1000000007
#define eps 1e-6
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int N = 1000010;
const int M = 100010;
ll n,m;
struct GraphEdge{
    ll to,next;
}edge[M];
ll head[N] = {0},num = 0;

struct GraphNode{
    ll outdegree;
    ll indegree;
}node[N];

void add(ll u,ll v){
    edge[++num].to = v;
    edge[num].next = head[u];
    head[u] = num;
    node[u].outdegree++;
    node[v].indegree++;
}

bool vis[N] = {0};
ll node_cnt = 0;

void solve(){
    priority_queue<ll,vector<ll>,greater<ll> > q;
    for(ll i = 1;i <= n;i++){
        if(node[i].indegree == 0)
            q.push(i);
    }
    while(!q.empty()){
        ll p = q.top(); q.pop();
        vis[p] = true;
        if(++node_cnt == n)printf("%lld\n",p);
        else printf("%lld ",p);
        for(ll i = head[p];i;i = edge[i].next){
            ll to = edge[i].to;
            if(!vis[to]){
                node[to].indegree--;
                if(node[to].indegree == 0){
                    q.push(to);
                }
            }
        }
    }
}
int main() {
	while(~scanf("%lld%lld",&n,&m)){
        num = 0;
        node_cnt = 0;
        memset(head,0,sizeof(head));
        memset(vis,0,sizeof(vis));
        for(ll i = 1;i <= n;i++){
            node[i].outdegree = 0;
            node[i].indegree = 0;
        }
        for(ll i = 1;i <= m;i++){
            edge[i].to = 0;
            edge[i].next = 0;
        }
        ll u,v;
        for(ll i = 1;i <= m;i++){
            scanf("%lld%lld",&u,&v);
            add(u,v);
        }
        solve();
    }
	return 0;
}
